﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using QLACQUY.DAO;
using QLACQUY.DTO;

namespace QLACQUY.BUS
{
    class KhachHangBUS
    {
        public ArrayList layDanhSach()
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.layDanhSach();
        }
        public KhachHangDTO layKhachHangTheoTen(string ten)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.layKHTheoTen(ten);
        }
        public KhachHangDTO layKhachHangTheoMaSo(string maso)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.layKHTheoMaSo(maso);
        }
        public bool checkExists(KhachHangDTO dto)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.checkExists(dto);
        }
        public int themKhachHang(KhachHangDTO dto)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.themKhachHang(dto);
        }
        public int capNhatKhachHang(KhachHangDTO dto)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.capNhatKhachHang(dto);
        }
        public KhachHangDTO layKhachHangTheoMa(int makh)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.layKHTheoMa(makh);

        }
        public int capNhatKhachHangTheoMa(KhachHangDTO dto)
        {
            KhachHangDAO dao = new KhachHangDAO();
            return dao.capNhatKhachHangTheoMa(dto);
        }
    }
}
